kubectl -n base exec polardbx-engine-0 -- /opt/polardbx_engine/bin/mysqldump -u root -h127.0.0.1 -P 4886 -B sz_data > /tmp/polardbx_sz_data.sql

kubectl -n base cp polardbx_sz_data.sql  polardb-x-0:/tmp/polardbx_sz_data.sql

kubectl -n base exec polardb-x-0 -- /opt/polardbx_engine/bin/mysql -u root -h127.0.0.1 -P 4886 sz_data -f /tmp/polardbx_sz_data.sql


#带查询条件导出表数据
kubectl -n base exec polardb-x-0 -- /opt/polardbx_engine/bin/mysqldump -u root -h127.0.0.1 -P 4886 sz_data t_data_info --where="sample_time >= 1742198400" --single-transaction -r /tmp/t_data_info_backup.sql
kubectl cp base/polardb-x-0:/tmp/t_data_info_backup.sql /tmp/t_data_info_backup.sql
kubectl -n base exec polardb-x-0 -- /opt/polardbx_engine/bin/mysqldump -u root -h127.0.0.1 -P 4886 sz_data t_result_info --where="data_id IN (SELECT data_id FROM t_data_info WHERE sample_time >= 1742198400)" --single-transaction -r /tmp/t_result_info_backup0319.sql
kubectl cp base/polardb-x-0:/tmp/t_result_info_backup0319.sql /tmp/t_result_info_backup0319.sql